package com.homepage.service.dto;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import jakarta.validation.constraints.*;;
import java.io.Serializable;
import java.util.Objects;

/**
 * A DTO for the {@link com.homepage.domain.Featurette} entity.
 */
@Getter
@Setter
@ToString
public class FeaturetteDTO implements Serializable {
    private Long id;

    private String companyId;

    @NotNull
    @Size(max = 30)
    private String mainTitle;

    @NotNull
    @Size(max = 60)
    private String subtitle;

    @NotNull
    @Size(max = 300)
    private String bulletin;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof FeaturetteDTO)) {
            return false;
        }

        FeaturetteDTO featuretteDTO = (FeaturetteDTO) o;
        if (this.id == null) {
            return false;
        }
        return Objects.equals(this.id, featuretteDTO.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(this.id);
    }


}
